"""The application's Globals object"""
from pylons import config

class Globals(object):
  """Globals acts as a container for objects available throughout the
  life of the application
  """

  def __init__(self, SIGNOUT_PART, FEEDBACK_PART, cibynet_email,
               confirmation_email):
    """One instance of Globals is created during application
    initialization and is available during requests via the 'g'
    variable
    
    Arguments:
      - SIGNOUT_PART: the string used to recognize when to log out the user.
              Typically: 'signout' or 'logout'.
      - FEEDBACK_PART: the string used to recognize when the user wants to 
               give feedback about the url before that string.
      - cibynet_email: string, the email to write to cibynet.
      - confirmation_email: Boolean, do we have to send a confirmation email 
              and wait for the user to click on the confirm link before
              registration is considered as validable by admin? 
    """
    # If the SIGNOUT_PART is added at the end of an url, then sign out the 
    # user.
    self.SIGNOUT_PART = SIGNOUT_PART
    self.FEEDBACK_PART = FEEDBACK_PART
    self.cibynet_email = cibynet_email
    self.confirmation_email = confirmation_email
